package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CashierRegisterSettingsMapper;
import com.ruoyi.system.domain.CashierRegisterSettings;
import com.ruoyi.system.service.ICashierRegisterSettingsService;

/**
 * 收银机设置 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-12
 */
@Service
public class CashierRegisterSettingsServiceImpl implements ICashierRegisterSettingsService
{
    @Autowired
    private CashierRegisterSettingsMapper cashierRegisterSettingsMapper;

    /**
     * 通过id查询收银机设置
     *
     * @param id 收银机设置主键
     * @return 收银机设置
     */
    @Override
    public CashierRegisterSettings selectCashierRegisterSettingsById(Long id)
    {
        return cashierRegisterSettingsMapper.selectCashierRegisterSettingsById(id);
    }

    /**
     * 查询收银机设置列表
     *
     * @param cashierRegisterSettings 收银机设置
     * @return 收银机设置
     */
    @Override
    public List<CashierRegisterSettings> selectCashierRegisterSettingsList(CashierRegisterSettings cashierRegisterSettings)
    {
        return cashierRegisterSettingsMapper.selectCashierRegisterSettingsList(cashierRegisterSettings);
    }

    /**
     * 新增收银机设置列表
     *
     * @param cashierRegisterSettings 收银机设置
     * @return 结果
     */
    @Override
    public int insertCashierRegisterSettings(CashierRegisterSettings cashierRegisterSettings)
    {
        return cashierRegisterSettingsMapper.insertCashierRegisterSettings(cashierRegisterSettings);
    }

    /**
     * 修改收银机设置列表
     *
     * @param cashierRegisterSettings 收银机设置
     * @return 结果
     */
    @Override
    public int updateCashierRegisterSettings(CashierRegisterSettings cashierRegisterSettings)
    {
        return cashierRegisterSettingsMapper.updateCashierRegisterSettings(cashierRegisterSettings);
    }

    /**
     * 通过id批量删除收银机设置信息
     *
     * @param ids 需要删除的收银机设置主键
     * @return 结果
     */
    @Override
    public int deleteCashierRegisterSettingsByIds(Long[] ids)
    {
        return cashierRegisterSettingsMapper.deleteCashierRegisterSettingsByIds(ids);
    }

    /**
     * 通过id删除收银机设置信息
     *
     * @param id 收银机设置主键
     * @return 结果
     */
    @Override
    public int deleteCashierRegisterSettingsById(Long id)
    {
        return cashierRegisterSettingsMapper.deleteCashierRegisterSettingsById(id);
    }

    /**
     * 根据门店ID查询收银机设置详情
     *
     * @param storeId 门店ID
     * @return 收银机设置详情
     */
    @Override
    public CashierRegisterSettings selectByStoreId(Long storeId) {
        return cashierRegisterSettingsMapper.selectByStoreId(storeId);
    }
}
